#!/bin/bash

#10.252.134.254 1
#10.165.96.112 2
#10.168.94.80 3
#10.168.83.145 4

# on 10.252.134.254 1

./join_slave.sh 10.252.134.254 7404 10.165.96.112 7400
./join_slave.sh 10.252.134.254 7405 10.165.96.112 7401
./join_slave.sh 10.252.134.254 7406 10.168.83.145 7402
./join_slave.sh 10.252.134.254 7407 10.168.83.145 7403

# on 10.165.96.112 2

./join_slave.sh 10.165.96.112 7404 10.168.94.80 7400
./join_slave.sh 10.165.96.112 7405 10.168.94.80 7401
./join_slave.sh 10.165.96.112 7406 10.252.134.254 7402
./join_slave.sh 10.165.96.112 7407 10.252.134.254 7403

# on 10.168.94.80 3

./join_slave.sh 10.168.94.80 7404 10.168.83.145 7400
./join_slave.sh 10.168.94.80 7405 10.168.83.145 7401
./join_slave.sh 10.168.94.80 7406 10.165.96.112 7402
./join_slave.sh 10.168.94.80 7407 10.165.96.112 7403

# on 10.168.83.145 4

./join_slave.sh 10.168.83.145 7404 10.252.134.254 7400
./join_slave.sh 10.168.83.145 7405 10.252.134.254 7401
./join_slave.sh 10.168.83.145 7406 10.168.94.80 7402
./join_slave.sh 10.168.83.145 7407 10.168.94.80 7403

#./stop_port.sh 7400 7401 7402 7403 7404 7405 7406 7407
#./clean_port.sh 7400 7401 7402 7403 7404 7405 7406 7407
#./start_node.sh 7400 7401 7402 7403 7404 7405 7406 7407
